import { _decorator, Component, Label, Node } from 'cc';
import { ModuleBase } from '../Card/ModuleBase';
import { GameData } from '../GameData';
const { ccclass, property } = _decorator;

@ccclass('Goldnum')
export class Goldnum extends ModuleBase {
    private _goldnum:number=20;
    get goldnum(){
        return this._goldnum;
    }
    set goldnum(gold:number){
        this._goldnum=gold;
    }
    private GoldL:Label=null;
    onInit(...rest: any[]): void {
        this.GoldL=this.node.getChildByName("GoldnumL").getComponent(Label);
        this.GoldL.string=GameData.coin.toString();
    }
}


